//
//  PayStyleTableViewCell.m
//  OneCreditTreasure
//
//  Created by iOS Grouper on 16/8/30.
//
//

#import "PayStyleTableViewCell.h"

@implementation PayStyleTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatView];
    }
    
    return self;
}
- (void)creatView{
    
    _logImageView = [UIImageView new];
    [self.contentView addSubview:_logImageView];
//    _logImageView.frame = CGRectMake(0, 0, 100, 100);
[_logImageView mas_makeConstraints:^(MASConstraintMaker *make) {
    make.centerY.mas_equalTo(self.contentView);
    make.left.mas_equalTo(self.contentView).offset(15 * AUTO_WIDTH);
    make.size.mas_equalTo(CGSizeMake(40 * AUTO_WIDTH, 40 * AUTO_HEIGHT));
    
}];
    _logImageView.backgroundColor = [UIColor redColor];
    
    
    _titleL = [UILabel new];
    [self.contentView addSubview:_titleL];
    [_titleL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.centerY.mas_equalTo(self.contentView);
        make.left.mas_equalTo(_logImageView.mas_right).offset(15 * AUTO_WIDTH);
        make.height.mas_equalTo(15 * AUTO_HEIGHT);
    }];
    _titleL.text = @"余额";
    _titleL.textColor = [UIColor blackColor];
    _titleL.font = [UIFont fontWithName:ZIXING size:13 * AUTO_HEIGHT];
    
    
    
    UIView *line = [UIView new];
    [self.contentView addSubview:line];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self.contentView.mas_bottom);
        make.height.mas_equalTo(0.4);
        //        make.width.mas_equalTo(kScreenW);
        make.left.mas_offset(15 * AUTO_WIDTH);
        make.right.mas_offset(0);
        
    }];
    line.backgroundColor = HS;
    
    
    
    
    _selectButton = [UIButton new];
    _selectButton.selected = YES;
    [self.contentView addSubview:_selectButton];
    [_selectButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-35 * AUTO_WIDTH);
        make.height.mas_equalTo(15 * AUTO_HEIGHT);
        make.width.mas_equalTo(15 * AUTO_WIDTH);
        make.centerYWithinMargins.mas_equalTo(self.contentView);
        
    }];
    [_selectButton setImage:[UIImage imageNamed:@"check"] forState:UIControlStateNormal];
    
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
